local-CVE-2026-0915
authorGNU Libc Maintainers <debian-glibc@lists.debian.org>
Wed, 27 May 2026 04:49:44 +0000 (11:49 +0700)
committerArnaud Rebillout <arnaudr@debian.org>
Wed, 27 May 2026 04:49:44 +0000 (11:49 +0700)
commit586c71393784253f696609aa031d54a069ae16a0
tree91bd17ce93b345b45dc769779f39565f8cf4d6fe
parent0754d624553a2809975538517cf6adaae1cc9eb9
local-CVE-2026-0915

Origin: upstream, https://sourceware.org/git/?p=glibc.git;a=commit;h=1bc1832cfc74c2a601220969f36e789a5e9f0ebe

From 1bc1832cfc74c2a601220969f36e789a5e9f0ebe Mon Sep 17 00:00:00 2001
From: Carlos O'Donell <carlos@redhat.com>
Date: Thu, 15 Jan 2026 15:09:38 -0500
Subject: [PATCH] resolv: Fix NSS DNS backend for getnetbyaddr (CVE-2026-0915)

The default network value of zero for net was never tested for and
results in a DNS query constructed from uninitialized stack bytes.
The solution is to provide a default query for the case where net
is zero.

Adding a test case for this was straight forward given the existence of
tst-resolv-network and if the test is added without the fix you observe
this failure:

FAIL: resolv/tst-resolv-network
original exit status 1
error: tst-resolv-network.c:174: invalid QNAME: \146\218\129\128
error: 1 test failures

With a random QNAME resulting from the use of uninitialized stack bytes.

After the fix the test passes.

Additionally verified using wireshark before and after to ensure
on-the-wire bytes for the DNS query were as expected.

No regressions on x86_64.

Reviewed-by: Florian Weimer <fweimer@redhat.com>
(cherry picked from commit e56ff82d5034ec66c6a78f517af6faa427f65b0b)

Gbp-Pq: Topic any
Gbp-Pq: Name local-CVE-2026-0915.diff
resolv/nss_dns/dns-network.c
resolv/tst-resolv-network.c